package com.cloudcc.mobile.adapter;

import android.content.Context;
import android.text.Html;
import android.text.TextUtils;
import android.widget.TextView;

import com.cloudcc.cloudframe.adapter.CommonAdapter;
import com.cloudcc.cloudframe.adapter.ViewHolder;
import com.cloudcc.cloudframe.util.StringUtils;
import com.cloudcc.mobile.R;
import com.cloudcc.mobile.entity.beau.BeauRelationFollowEntity;

public class BeauRelationFollowAdapter extends
		CommonAdapter<BeauRelationFollowEntity.RelateData> {

	public BeauRelationFollowAdapter(Context mContext) {
		super(mContext);
	}

	@Override
	public void convert(ViewHolder holder, BeauRelationFollowEntity.RelateData t) {

		holder.setText(R.id.tv1, t.date);
		holder.setText(R.id.tv2, t.user);
		if (!TextUtils.isEmpty(t.operate)) {
			String remove = StringUtils.remove(t.operate, "\\");
			TextView view = holder.getView(R.id.tv3);
			view.setText(Html.fromHtml(remove));
		}
	}
	@Override
	public int getLayoutId() {
		return R.layout.beau_reltat_follow;
	}

}
